<!-- playbyplay.html -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Boxscore Junkie : Play-By-Play</title>
  {% ifequal r "on" %}
    <meta http-equiv="refresh" content="{{t}}" />
  {% endifequal %}
  <link rel="stylesheet" type="text/css" href="/css/core.css" />
</head>
<body onload="initPage({{selDay.year}},{{selDay.month}},{{selDay.day}})">
<div id="page">
	{% include "header.html" %}
	{% include "navbar-playbyplay.html" %}
	<div id="content">
		<div id="game-menu">
	    	{% include "game-menu.html" %}
	  	</div>
	    <!-- tabs -->
		<div class="tabs">
			<a class="tab" href="boxscore?gid={{game.gameday}}"><span>Boxscore</span></a>
			<a class="tab selected" href="/playbyplay?gid={{game.gameday}}"><span>Play-by-Play</span></a>
			<a class="tab" href="/pitchbypitch?gid={{game.gameday}}"><span>Pitch-by-Pitch</span></a> 
			<a class="tab" href="/highlights?gid={{game.gameday}}"><span>Highlights</span></a>
		</div>
	  	<div id="game-detail">
			<div id="playbyplay" class="tab-content">
			    {% ifequal game.game_status.ind "O" %}
			      {% include "boxscore-linescore-final.html" %}
			    {% endifequal %}
			    {% ifequal game.game_status.ind "F" %}
			      {% include "boxscore-linescore-final.html" %}
			    {% endifequal %}
			    {% ifequal game.game_status.ind "I" %}
			      {% include "boxscore-linescore-inprogress.html" %}
			    {% endifequal %}
			    <br />
			    <table cellspacing="0" class="pbp">
			    {% for inning in innings %}
			      <tr>
			        <th class="{{game.away_code}}">{{game.away_team_city}} - Top of {{inning.num}}</th>
			      </tr>
			    {% for event in inning.top_atbats %}
			      <tr>
			      {% if forloop.counter0|divisibleby:"2" %}
			        <td class="odd">
			      {% else %}
			        <td class="even">
			      {% endif %}
			        {% if event.score %}
			          <span style="color: green;font-weight:bold;">{{event.des}}</span>
			        {% else %}
			          {{event.des}}
			        {% endif %}
			        </td>
			      </tr>
			    {% endfor %}
			      <tr>
			        <th class="{{game.home_code}}">{{game.home_team_city}} - Bottom of {{inning.num}}</th>
			      </tr>
			      {% for event in inning.bottom_atbats %}
			        <tr>
			        {% if forloop.counter0|divisibleby:"2" %}
			          <td class="odd">
			        {% else %}
			          <td class="even">
			        {% endif %}
			          {% if event.score %}
			            <span style="color: green;font-weight:bold;">{{event.des}}</span>
			          {% else %}
			            {{event.des}}
			          {% endif %}
			          </td>
			        </tr>
			      {% endfor %}
			    {% endfor %}
			 	</table>
			</div><!-- end tab-content -->
		</div><!-- end game-detail -->
		<div class="fix"></div>
	</div><!-- end content -->
	{% include "navbar-playbyplay.html" %}
</div><!-- end page -->
{% include "footer.html" %}
<script type="text/javascript" src="/js/core.js"></script>
</body>
</html>